<!DOCTYPE html>
<html lang="zh-CN">
  <head>
    <title>Page title</title>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=Edge">
    <link href="lib/my.css" rel="stylesheet" />
    <link href="lib/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
    <link href="lib/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" />
    <script src="lib/jquery/3.1.1/jquery.min.js"></script>
  </head>

  <body>
    <button type="button" name="button">button</button>
    <div id="div1" class="red">
      <p>
        red
      </p>
    </div>
    <script>
      $(document).ready(function(){
        $("button").click(function(){
          arr = [];
          for (var i = 0; i < 20; i++) {
            arr[i] = [];
          }
          arr[0].push("a");
          arr[0].push("b");
          arr[1].push("c");
          arr[1].push("d");
          $("#div1").append("<p>" + arr[0].length + "</p>");
        });
      });
    </script>
  </body>
  </html>
